<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="renderer" content="webkit" />

		<script type="text/javascript" src="/camera/js/cn.tee3.avd-2.5.0.0.min.js?20160415021957"></script>
		<title>服务器外呼rtsp和H323 Demo</title>
	</head>

	<body style="margin:0 13px;">			
		<div id="outgoingDiv">
			
			<div id="operationDiv">
				<div id="inputDiv" style="display:none;">
					<div id="optionDiv" style="font-size: 16px;padding-left: 20px;">
						房间Id:<input type="text" placeholder="请输入房间Id" value="" id="roomId" name="roomId"/>
						用户Id:<input type="text" placeholder="请输入用户Id" value="" id="userId" name="userId" />
						<input type="text" placeholder="请输入用户名" value="" id="userName" name="userName" />
						
						设备地址：<input style="width: 320px;" type="text" placeholder="请输入设备地址,如rtsp://xxxx" value="" id="userAddress" name="userAddress" />
						<br>
						 辅流地址：<input style="width: 320px;" type="text" placeholder="请输入辅流地址" value="" id="assAddress" name="assAddress" />					
						<br> 
						设备帐号：<input type="text" placeholder="请输入设备帐号" value="" id="loginName" name="loginName" />
						<br><!-- admin12345 -->
						设备密码：<input type="text" placeholder="请输入设备密码" value="" id="loginPassword" name="loginPassword" />	
						
					</div>				
					<div id="optionDiv">
					<!-- rtsp://streaming3.webcam.nl:1935/n224/n224.stream -->
						<input type="text" value="" id="userAddress" name="userAddress" /><!-- rtsp://streaming3.webcam.nl:1935/n224/n224.stream -->

					</div>
				</div>
				<div id="buttonDiv" style="width: 39%;height: 100%;float: left;padding: 0 0 0 10px;">

				</div>
			</div>
			
			<div id="showDiv">
				<div id="userShowDiv" style="display:none;">
					
					<input type="button" value="刷新" onclick="getOutgoingUsers();" />
					<br>
					<br>
					<div id="deviceList" style="overflow: auto;">
					</div>
				</div>
				<div id="mediaDiv"><!-- width: 39%; -->
					<!-- <h3>视音频窗口[双击全屏]</h3> -->
					<div>
					<div class="videoLoding" id="videoLoding" style="background-color:#d5d3d3;width:500px;height:282px;text-align: center;line-height: 300px;color:#999;margin-top: 9px;">等待加载视频</div>
						
					<video id="remoteVideo" muted autoplay style="display:none;width:500px;height:300px;"></video>
						<audio id="remoteAudio" autoplay></audio>
					</div>
				</div>
			</div>
					</div>
			
			<div id="logDiv" style="display:none;">
				<h3>日志结果展示：</h3>
				
				<div id="jp-container">
					<div id="resultShow">
					</div>
				</div>
				
				
			</div>
			
		</div>
		<script type="text/javascript" src="/camera/js/outgoing.js"></script>
		<script type="text/javascript">
			$(function () {
				
				$("#outgoingCloseBtn", parent.document).click(function(){
					destroyOutgoingUser();
					$("#outgoingDiv", parent.document).html("");
				})
				$("#userShowDiv").hide();
				$("#logDiv").hide();
				$("#inputDiv").hide();
				/* $("#cameraVideoModal .close").click(function () {
					destroyOutgoingUser();
				}) */
 				setTimeout(function () {
					createOutgoingUser();
				},1000);
 				var cameraUrl = $("#videoIfm", parent.document).attr("cameraUrl");
 				var loginName = $("#videoIfm", parent.document).attr("loginName");
 				var loginPassword = $("#videoIfm", parent.document).attr("loginPassword");
 				console.log(cameraUrl,loginName,loginPassword)	
				$("#userAddress").val(cameraUrl);
				$("#loginName").val(loginName);
				$("#loginPassword").val(loginPassword);
				
/*  				$.ajax({
 				    url: '/deviceStatus/count/bystatus/1/bydevicetype/001',
 				    type: 'get',
 				    success: function (data) {
 				    	if(data.status == 200) {
 				    		alarmNum = data.data;
 				    	    $('.alarmNum').text(alarmNum);
 				         }else{
 				        	 winTip.alert(data.message)
 				         }
 				    }
 				}); */
 				//console.log($("#userAddress").val())
			});
		</script>
	</body>

</html>